/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    text-align: center;
}

/* 导航样式 */
nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: #f0f0f0;
}

nav ul li a.active {
    background-color: #4CAF50;
    color: white;
}

/* 主内容区域样式 */
main {
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.tool-container {
    width: 100%;
}

.tool-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.tool-header h2 {
    margin-bottom: 10px;
}

.format-options {
    display: flex;
    gap: 15px;
}

.format-options label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 编辑器样式 */
.editor-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
}

.editor-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-wrapper h3 {
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-display {
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: auto;
    background-color: #f8f8f8;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
}

.primary-btn:hover {
    background-color: #45a049;
}

.secondary-btn {
    background-color: #f1f1f1;
    color: #333;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
}

/* 日期时间工具样式 */
.datetime-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.datetime-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background-color: #f9f9f9;
}

.datetime-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.result-box {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.result-item {
    display: flex;
    margin-bottom: 5px;
}

.result-item .label {
    font-weight: bold;
    width: 150px;
}

.result-item .value {
    flex: 1;
}

.input-group {
    margin-bottom: 15px;
}

.full-width {
    width: 100%;
}

.full-width input, .full-width textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 代码对比工具样式 */
.diff-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diff-editors {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {
    .diff-editors {
        flex-direction: column;
    }
}

.diff-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.diff-editor h3 {
    margin-bottom: 10px;
}

.full-height {
    height: 300px;
}

.button-row {
    display: flex;
    gap: 10px;
}

.diff-result {
    margin-top: 20px;
}

.diff-view-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.diff-panel {
    flex: 1;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    overflow: auto;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #f8f8f8;
}

/* URL工具样式 */
.url-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.url-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background-color: #f9f9f9;
}

.url-section h3 {
    margin-bottom: 15px;
}

.result-box textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    resize: vertical;
}

/* 代码转换工具样式 */
.converter-container {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {
    .converter-container {
        flex-direction: column;
    }
}

/* 语法高亮样式 */
.hljs-string {
    color: #008000;
}

.hljs-number {
    color: #0000ff;
}

.hljs-boolean {
    color: #0000ff;
}

.hljs-null {
    color: #0000ff;
}

.hljs-keyword {
    color: #a52a2a;
    font-weight: bold;
}

.hljs-punctuation {
    color: #000;
}

.hljs-property {
    color: #a52a2a;
}

/* 差异对比样式 */
.diff-add {
    background-color: #e6ffed;
    color: #24292e;
}

.diff-remove {
    background-color: #ffeef0;
    color: #24292e;
}

.diff-line {
    padding: 0 5px;
    white-space: pre;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
} 